package com.hongdee.crm.question.controller;

import com.hongdee.crm.question.service.ITCrmQuestionGroupItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Name: 问题项
 * @Author: Liu XiaoLong
 * @Date: 2017/10/16 11:06
 * @Remark:
 */
@RestController
@RequestMapping("/crm/question/group/item")
public class TCrmQuestionGroupItemController  {
    @Autowired
    private ITCrmQuestionGroupItemService itCrmQuestionGroupItemService;

    @RequestMapping("/page")
    public Map page(@RequestParam(name = "uid",defaultValue = "") String uid,
                    @RequestParam(name = "token",defaultValue = "") String token,
                    @RequestParam(name = "start",defaultValue = "") String start,
                    @RequestParam(name = "limit",defaultValue = "50") String limit,
                    @RequestBody Map data) throws Exception{

       Map map =  itCrmQuestionGroupItemService.page(uid,data,start,limit);
       map.put("success",true);
       map.put("msg","查询成功");

       return map;
    }
}
